package com.company;

public class TaxCharging {
    public double charging(double distance, double parkingTime) {
        double fee = 0.0;
        if (distance <= 8) {
            fee = 0.8 * distance;
        } else {
            fee = 0.8 * 8 + 1.5 * 0.8 * (distance - 8);
        }
        fee += parkingTime * 0.25;
        return fee;

    }
}
